package com.longlong.controller;

import com.longlong.server.HttpServlet;
import com.longlong.server.HttpServletRequest;
import com.longlong.server.HttpServletResponse;

import java.util.HashMap;

/**
 * 用于处理 login 请求
 *
 * @author longlong
 */
public class LoginController extends HttpServlet {
    public void service(HttpServletRequest request, HttpServletResponse response) {
        HashMap<String, String> map = request.getParamsMap();
        String name = map.get("name");
        String password = map.get("password");
        System.out.println("name = " + name + " password = " + password);
        response.write("登录成功!<br>");
        response.write(name+" , welcome to bank system");
    }
}
